#!/bin/bash

#
# Copyright (c) Vladimir Likic 2005-2011
#

source PATH_PARAMETERS
source RUN_PARAMETERS

for seq_name in $SEQUENCES
do
  echo -ne "\n----------------------\n"
  echo -ne " Working on $seq_name\n"
  echo -ne "----------------------\n"

  if [ -e "$MSF_DIR/$seq_name.w" ]; then
    echo -ne " Working on $HMM_MODELS/$seq_name.hmm.w\n"
    $HMMBUILD -n $seq_name $HMM_MODELS/$seq_name.hmm.w \
        $MSF_DIR/$seq_name.w
  fi

  if [ -e "$MSF_DIR/$seq_name.t" ]; then
    echo -ne " Working on $HMM_MODELS/$seq_name.hmm.t\n"
    $HMMBUILD -n $seq_name $HMM_MODELS/$seq_name.hmm.t \
        $MSF_DIR/$seq_name.t
  fi

done


